package com.qf.security1.mapper;

import com.qf.security1.pojo.Resources;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ResourcesMapper {

    @Select("SELECT re.*,r.rname\n" +
            "FROM roles r,roles_res rr,resources re\n" +
            "WHERE rr.`roleId`=r.`id` AND rr.`resId`=re.`id`")
    @ResultMap("resMap")
    List<Resources> findAll();
}
